package com.xiaozhi.common.config;

import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SSLConfig {
  
    @Bean
    public WebServerFactoryCustomizer<NettyReactiveWebServerFactory> sslCustomizer() {
        return factory -> {
            Ssl ssl = new Ssl();
            ssl.setKeyStore("classpath:scs1749984683818_www.wuxiankj.com_server.jks");
            ssl.setKeyStorePassword("Ju2.bt@qQXMh&fWc");
            ssl.setKeyStoreType("JKS");
           // ssl.setKeyAlias("");
            factory.setSsl(ssl);
            factory.setPort(443);
        };
    }
}
